     print("%d*%d=%d"%(j,i,i*j),end="\t")
    print()

for i in range(1,10):
    for j in range(1,i+1):
        print("%d*%d=%d" % (j, i, i * j), end="\t")
    print("\n")


#打印完数
for i in range(2,100):
    for j in range(2,i):
        if i%j==0:
            break
    else:
        print(i)
# 打印100以内的所有完美数
for num in range(1, 101):
    if num < 2:
        continue

    factors_sum = 1  # 初始化因数和为1（因为1总是因数）
    # 遍历从2到num//2的所有数
    for i in range(2, num // 2 + 1):
        if num % i == 0:
            factors_sum += i

    if factors_sum == num:
        print(num)


#打印质数
@@ -45,13 +55,24 @@ for i in range(2,100):


#打印斐波那契数列
num = 10
# 打印前10个斐波那契数
a, b = 0, 1
for i in range(num):
    print(a, end=" ")
for _ in range(50):
    print(a, end=' ')
    a, b = b, a + b
    print()
    print(b)
    print()
    print(a)

def f(n):
    if n <=0 :
        return 0
    if n == 1 :
        return  1
    else:
        return  f(n-1)+f(n-2)
for i in range(50):
    print(f(i))





